import { createRouter, createWebHistory,createWebHashHistory } from 'vue-router'
import Login from '@/views/login/index.vue'
import Layout from '@/views/Layout/index.vue'
import Home from '@/views/home/index.vue'
import UserList from '@/views/userList/index.vue'
import DianPuList from '@/views/DianPuList/index.vue'
import kongbai from '@/views/kongbai/index.vue'




const router = createRouter({
  // hash
  history: createWebHashHistory(import.meta.env.BASE_URL),
  // history
  // history: createWebHistory(import.meta.env.BASE_URL),

  routes: [
    {
      path: '/',
      name: 'login',
      component: Login
    },
    {
      path: '/',
      component: Layout,
      redirect: '/layout',
      children: [
          // { path: '', component: Login },
        { path: '/home',name:'订单管理列表', component: Home,meta: {keepAlive: false} },
        { path: '/userList',name:'账号管理列表', component: UserList },
        { path: '/DianPuList',name:'店铺管理列表', component: DianPuList },
        { path: '/kongbai',name:'', component: kongbai },


      ]
    },
    
  ]
})

export default router
